package com.shj.em.util;

import java.util.HashMap;
import java.util.Map;

public class CacheManager {

    private static CacheManager cacheManager = new CacheManager();

    private static Map<String, Object> map = new HashMap<>();

    private CacheManager(){}

    public static CacheManager getInstance(){
        return cacheManager;
    }

    public Object get(String key){
        return map.get(key);
    }

    public void remove(String key){
        map.remove(key);
    }

    public void add(String key, Object object){
        map.put(key, object);
    }
}
